﻿namespace WebApi.Test
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("测试已启动...");

            while (true)
            {
                Console.WriteLine("测试创建设备api...");

                DeviceServiceTester.Create();

                Console.WriteLine("测试修改设备api...");

                DeviceServiceTester.Update();

                Console.WriteLine("测试切换设备状态api...");

                DeviceServiceTester.Toggle();

                Console.WriteLine("是否继续测试删除设备api？");
                if (Console.ReadLine() == "y")
                    DeviceServiceTester.Delete();

                Console.WriteLine("查询结果");
                DeviceServiceTester.Query();

                Console.WriteLine("获取某个设备...");
                DeviceServiceTester.GetById();



                //Console.WriteLine("测试创建订单api...");

                //OrderServiceTester.Create();

                //Console.WriteLine("测试修改订单api...");

                //OrderServiceTester.Update();

                //Console.WriteLine("测试订单付款api...");

                //OrderServiceTester.Pay();

                //Console.WriteLine("是否继续测试删除订单api？");
                //if (Console.ReadLine() == "y")
                //    OrderServiceTester.Delete();

                //Console.WriteLine("查询结果");
                //OrderServiceTester.Query();

                //Console.WriteLine("获取某个订单...");
                //OrderServiceTester.GetById();


                Console.WriteLine("任意键继续测试 或 按\"n\" 退出...");

                if (Console.ReadLine() == "n")
                    break;


            }


        }
    }
}
